]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
popupMenu: Center-align switches
authorFlorian Müllner <fmuellner@gnome.org>
Sat, 29 Jun 2024 19:21:29 +0000 (21:21 +0200)
committerFlorian Müllner <fmuellner@gnome.org>
Sat, 29 Jun 2024 19:29:32 +0000 (21:29 +0200)
The default align of FILL was fine with the asset-based switches,
as the image would still keep its fixed height. But after the switch
to a pure CSS implementation, the alignment now results in stretched
switches. Fix this by explicitly center-aligning the widget.

Close: https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/7745
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3403>

js/ui/popupMenu.js

index d502a7b9e13a556c5c1c5072f493699442a71e32..b6ad5450871372b2649239e1929d726878c840f8 100644 (file)
@@ -344,6 +344,7 @@ export const Switch = GObject.registerClass({
         super._init({
             style_class: 'toggle-switch',
             accessible_role: Atk.Role.CHECK_BOX,
+            y_align: Clutter.ActorAlign.CENTER,
             track_hover: true,
             reactive: true,
         });